package core.actor.core
{
	public class DressPart
	{
		public function DressPart()
		{
		}
		//可单独换装的部分,既资源包
		public static const Face:String = "01";
		public static const HeadDress:String = "03";
		public static const Armet:String = "04";
		public static const Hair:String = "02";
		public static const Wing:String = "05";
		public static const Cloth:String = "06";
		public static const Weapon:String = "07";
		public static const Belt:String = "08";
		public static const Trousers:String = "09";
		public static const Shoes:String = "10";
		public static const Shadow:String = "Dress_Shadow";
		public static const HeadUpRing:String = "Dress_HeadUpRing";
		public static const HeadBehindRing:String = "Dress_HeadBehindRing";
		public static const FootRing:String = "Dress_FootRing";
		public static const BodyRing:String = "Dress_BodyRing";
		
		
		
		public static function getDressNameByBonesName(name:String):String
		{
			if(name.indexOf("Face")>-1)
				return DressPart.Face;
			if(name.indexOf("Headdress")>-1)
				return DressPart.HeadDress;
			if(name.indexOf("Armet")>-1)
				return DressPart.Armet;
			if(name.indexOf("Hair_Center")>-1
				|| name.indexOf("Hair_Left")>-1
				|| name.indexOf("Hair_Right")>-1
				|| name.indexOf("Hair_Back")>-1)
				return DressPart.Hair;
			if(name.indexOf("_Wing_L")>-1
				|| name.indexOf("_Wing_R")>-1)
				return DressPart.Wing;
			if(name.indexOf("_BodyUp")>-1
				|| name.indexOf("_BodyDown")>-1
				|| name.indexOf("_BodyBra")>-1
				|| name.indexOf("_Arm_L")>-1
				|| name.indexOf("_Forearm_L")>-1
				|| name.indexOf("_Arm_R")>-1
				|| name.indexOf("_Forearm_R")>-1
				|| name.indexOf("_Hand_L")>-1
				|| name.indexOf("_Hand_R")>-1)
				return DressPart.Cloth;
			if(name.indexOf("_Weapon_L")>-1
				|| name.indexOf("_Weapon_R")>-1)
				return DressPart.Weapon;
			if(name.indexOf("_Belt")>-1)
				return DressPart.Belt;
			if(name.indexOf("_Shorts")>-1
				|| name.indexOf("_Thigh_L")>-1
				|| name.indexOf("_Thigh_R")>-1)
				return DressPart.Trousers;
			if(name.indexOf("_Calf_L")>-1
				|| name.indexOf("_Calf_R")>-1
				|| name.indexOf("_Boot_L")>-1
				|| name.indexOf("_Boot_R")>-1
				|| name.indexOf("_Foot_L")>-1
				|| name.indexOf("_Foot_R")>-1)
				return DressPart.Shoes;
			
			if(name.indexOf("Shadow")>-1)
				return DressPart.Shadow;
			if(name.indexOf("_HeadUpRing")>-1)
				return DressPart.HeadUpRing;
			if(name.indexOf("_HeadBehindRing")>-1)
				return DressPart.HeadBehindRing;
			if(name.indexOf("_FootRing")>-1)
				return DressPart.FootRing;
			if(name.indexOf("_BodyRing")>-1)
				return DressPart.BodyRing;
			
			return "";
		}
		
		public static function getExtraResByBoneName(name:String):Array
		{
			if(name.indexOf("Face")>-1)
				return ["Face","Headdress","Armet","Hair_Center"];
			if(name.indexOf("_Shorts")>-1)
				return ["_Belt"];
			if(name.indexOf("_Calf_L")>-1)
				return ["_Boot_L"];
			if(name.indexOf("_Calf_R")>-1)
				return ["_Boot_R"];
			return null;
		}
		
		
	}
}